package com.jwsoft.manager.core.dao.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 个人信息授权设置表
 *
 * @author chenzh
 * @since 2024-03-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("person_information_setting")
@Schema(name = "PersonInformationSetting", title = "个人信息授权设置表", description = "个人信息授权设置表实体类")
public class PersonInformationSetting extends Model<PersonInformationSetting> {

    private static final long serialVersionUID = 1L;

    @Schema(name = "personInformationSettingId", description = "个人信息授权设置id")
    @TableId(value = "person_information_setting_id", type = IdType.ASSIGN_ID)
    private Long personInformationSettingId;

    @Schema(name = "personInformationType", description = "授权类型")
    @TableField(value = "person_information_type")
    private String personInformationType;

    @Schema(name = "personInformationName", description = "授权名称")
    @TableField(value = "person_information_name")
    private String personInformationName;

    @Schema(name = "status", description = "有效状态 1 有效 0无效")
    @TableField(value = "status")
    private String status;

    @Schema(name = "useType", description = "使用类型")
    @TableField(value = "use_type")
    private String useType;

    @Schema(name = "createName", description = "创建人")
    @TableField(value = "create_name", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private String createName;

    @Schema(name = "createTime", description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private Date createTime;

    @Schema(name = "updateName", description = "修改人")
    @TableField(value = "update_name", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private String updateName;

    @Schema(name = "updateTime", description = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private Date updateTime;

    @Schema(name = "del", description = "逻辑删除标志")
    @TableField(value = "del", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    @TableLogic
    private String del;

    @Override
    public Serializable pkVal() {
        return this.personInformationSettingId;
    }
}
